#ifndef MYTASK_H
#define MYTASK_H
#include <string>
#include "tcpconnection.hpp"
#include "logger.h"
using std::string;
namespace moqi
{

using TcpConnectionPtr = std::shared_ptr<TcpConnection>;
class Mytask
{                                                                                                                   
public:
    Mytask (const string &msg, TcpConnectionPtr pconn):
    _msg(msg),
    _pconn(pconn)
    {   

    }   

    void process()
    {   
        LOG_INFO("process");
        _pconn->sendInloop(_msg);
    }   

private:
    string _msg;
    TcpConnectionPtr _pconn;
};


}//end of namespace moqi

#endif //TASK_H
